package com.zhehekeji.opsys.api.webservice.server;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;

import com.zhehekeji.opsys.api.resp.CheckRegisterResp;
import com.zhehekeji.opsys.api.resp.UserOrderResp;
import com.zhehekeji.opsys.api.resp.UserRegisterResp;
import com.zhehekeji.opsys.api.resp.UserUpdateResp;
import com.zhehekeji.opsys.api.service.manager.UserManagerService;

/**
 * @ClassName UserManagerWS
 * @Description TODO
 * @author chenweiliu chenwei.liu@163.com
 * @date 2015-4-14   上午10:14:33
 */
@WebService(endpointInterface="com.zhehekeji.opsys.api.webservice.server.UserManager",
name="userManager",portName="userManagerPort",serviceName="userManagerWS")
public class UserManagerWS implements UserManager {

	@Autowired
	private UserManagerService userManagerService;
	
	@Override
	public UserOrderResp order(String productCode, Integer point, String userID, Long cpCode) {

		UserOrderResp resp = userManagerService.order(productCode, point, userID, cpCode);
		return resp;

	}

	@Override
	public UserRegisterResp register(String userID, String userName, String mobileNo, Long cpCode) {

		UserRegisterResp resp = userManagerService.register(userID, userName, mobileNo, cpCode);
		return resp;

	}

	@Override
	public CheckRegisterResp checkRegister(String userID, Long cpCode) {
		
		CheckRegisterResp resp = userManagerService.checkRegister(userID, cpCode);
		return resp;
		
	}

	@Override
	public UserUpdateResp update(String userID, String userName, String mobileNo, Long cpCode) {

		UserUpdateResp resp = userManagerService.update(userID, userName, mobileNo, cpCode);
		return resp;

	}
}
